1. /* sdfqrrt.cpp by K.Tsuru */
  2. // function ID = 3012 DRADIX only
  3. /****************************
  4. SDouble class
  5. quartic root of a
  6. It returns a*{RecQrrt(a)}^3.
  7. *****************************/
  8. #ifndef SN_H
  9. #include "sn.h"
  10. #endif
  11. static const char* const func = "Qrrt";
  12. SDouble Qrrt(const SDouble& a){
  13. SDouble d, y;
  14. y = RecQrrt(a); // if a < 0 causes an error
  15. y = a*Dpow(y, 3);
  16. if(y.Verify()){ // check |a - y^3| << a ?
  17. d = y*y; d = d*d;
  18. d = a - d;
  19. if(!d.IsMLT(a)){ //It sees the relative error. d << a ?
  20. y.SetError(y.VERIFY, func, 3012);
  21. }
  22. }
  23. return y;
  24. }

sdfqrrt.cpp : last modifiled at 2001/02/19 17:16:32(595 bytes)
created at 2017/10/07 10:22:50
The creation time of this html file is 2017/10/07 11:29:39 (Sat Oct 07 11:29:39 2017).